/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 */
package org.sbbs.artemislearn;

/**
 *
 * @author jenkins
 */

import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

@Component
public class Receiver {

  @JmsListener(destination = "mailbox", containerFactory = "queueFactory")
  public void receiveMessage(Email email) {
    System.out.println("Received <" + email + ">");
  }
//  @JmsListener(destination = "mailbox1", containerFactory = "queueFactory")
  public void receiveMessage1(Email email) {
    System.out.println("Received <" + email + ">");
  }

}